home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
COMMUNIC
/
1312.ZIP
/
MT.DOC
< prev
next >
Wrap
Text File
|
1988-07-29
|
62KB
|
1,559 lines
MiniTerm V1.4 Documentation
The following documents version 1.4 of the CSC Minitel Terminal
emulator (MiniTerm).
This document is divided into the following sections.
Section 1.0 - Hardware and Operating System
Requirements
Section 2.0 - Installing the Emulator
Section 3.0 - How to run the Emulator
Section 4.0 - Emulator Commands
Appendix A - Command Line Parameters
Appendix B - Files that are distributed with the
emulator
Appendix C - Configuration Parameters
Appendix D - Keyboard Mapping
Appendix E - Script Language Description
Appendix F - Entering Control Characters
Appendix G - Use of the Minitel Function Keys
Appendix H - Error Messages
Appendix I - Printing the screen
1.0 Hardware and Operating System Requirements
------------------------------------------
The following minimum hardware configuration is necessary in order to
run the emulator:
- 192K RAM
- MDA, CGA, EGA or Hercules video display adaptor
- One 5.25 or 3.5 inch floppy disk drive with a capacity
of 360K or more.
The emulator requires MS or PC-DOS version 2.0 or higher.
2.0 Installing the Emulator
-----------------------
The specific steps that you must take to install the emulator depend
on whether you received your emulator on an Installation Diskette or
whether you downloaded it from a Bulletin Board. If you downloaded
your copy of the emulator from a Bulletin Board then proceed to
section 2.1 otherwise skip to section 2.2.
2.1 Emulator Downloaded from a Bulletin Board
The file that you downloaded from the Bulletin Board is a self
unpacking archive containing the emulator and its documentation. The
best way to proceed is to create an installation diskette from this
archive. To do this copy the archive to a blank formatted floppy
diskette, put the diskette in drive A:, then type the following
commands.
A:
RENAME archive_name RUNME.EXE
RUNME
DEL RUNME.EXE
Now that you have created an installation diskette you can proceed to
section 2.2.
2.2 Emulator Received on an Installation Diskette
To install the emulator from an installation diskette just put the
installation diskette in drive A:, set the default drive to A:, then
type 'MTINST'. Once MTINST is running just follow the instructions.
MTINST will prompt you for information such as your modem type,
display type and the drive and directory in which you want the
emulator installed.
The installation program (MTINST.EXE) creates a configuration file
(MT.CFG) and copies the emulator to the installation drive/directory.
The configuration file contains hardware specific parameters for your
machine such as display adaptor type, communication port and modem
speed. See Appendix C for a complete description of all
configuration file parameters.
3.0 How to run the emulator
-----------------------
Once the emulator has been installed you can run it by performing the
following steps.
If you installed the emulator on a floppy disk:
INSERT THE DISKETTE IN DRIVE A:
TYPE A: [ENTER]
TYPE MT [ENTER]
If you installed the emulator on a hard disk:
TYPE C: [ENTER] (if installed on drive C:)
TYPE CD\MT [ENTER] (if installed in \MT subdirectory)
TYPE MT [ENTER]
A real Minitel terminal contains nine special keys (called function
keys) that are not on the PC keyboard. The nine special keys are
labelled INDEX, CANCEL, PREVIOUS, REPEAT, GUIDE, CORRECTION, NEXT,
SEND and LOCAL/LINE. Since these keys are not available on the PC
keyboard, the function keys on the PC keyboard (labelled F1 to F9)
are used as a replacement. Some of the Minitel special keys have more
than one replacement on the PC keyboard. For example if an
application asks you to press the SEND key you can either press F8 or
the ENTER key. The following table shows the mapping of the Minitel
function keys to their equivalents on the PC keyboard.
English Minitel French Minitel
Key Labeling PC Equivalent(s) Key Labeling
INDEX F1 or HOME SOMMAIRE
CANCEL F2 or END ANNULATION
PREVIOUS F3 or PGUP or SHIFT TAB RETOUR
REPEAT F4 REPETITION
GUIDE F5 GUIDE
CORRECTION F6 or BKSP CORRECTION
NEXT F7 or PGDN or TAB SUITE
SEND F8 or ENTER ENVOI
LOCAL LINE F9 CONNEXION FIN
From within the emulator you can press the PC key labelled F10 to get
a help menu showing the above Minitel function key mapping. The help
menu also displays a listing of the following important commands that
control your link with the network.
Logon to Network SHIFT F1
Change Service SHIFT F2
Logoff Network then Quit SHIFT F3
See Appendix D for the complete mapping of the Minitel keyboard to
the PC keyboard.
Of the Minitel function keys the most commonly used ones are SEND
which is used like ENTER (or Carriage Return) on a normal terminal,
CORRECTION which allows you to correct your typing errors (I use this
one a lot) and GUIDE which is used to request help from the service
you are using. See Appendix G for a more complete description of the
uses of the Minitel function keys.
4.0 Emulator Commands
-----------------
The following commands can be issued during Minitel emulation.
Commands of the form 'ALT letter' are issued by holding down the ALT
key and typing the 'letter'. For example the command 'ALT x' means
hold down the ALT key then press the letter x key. Commands of the form
'SHIFT Fx' are issued by holding down the SHIFT key then pressing the
key labelled Fx.
4.1 Send Break Signal (ALT b)
This command sends a break signal to the remote system. The length of
the break sent is specified by the BREAK_LEN configuration parameter.
The value in the BREAK_LEN parameter is rounded up to the nearest
multiple if 55 milliseconds (this is the default granularity of the PC
clock interupts).
4.2 Exit emulator without dropping line (ALT x)
This command allows you to exit to DOS from the emulator without
dropping the line.
4.3 Drop line then exit emulator (ALT q)
This command is only available during TTY emulation. During Minitel
emulation the SHIFT F3 command must be used to disconnect from the
current service and exit from the emulator.
During TTY emulation this command drops the line and then terminates
execution of the emulator. Prior to dropping the line this command
sends a LOCAL LINE key to disconnect from the current service. For
HAYES modems the line is dropped by first sending three plus signs
(+++) to go into local mode and then issuing the ATH command. For
other types of modems the line is dropped by dropping the RS232 DTR
signal.
4.4 Program Function Keys (SHIFT F1 -> SHIFT F10)
The program function keys can be used to extend the functionality of
the emulator by adding your own commands. A program function key can
be used to execute a script language program (see Appendix E for
instructions on writing your own script language programs) or to
cause a pre-defined series of characters to be sent to the remote
system as if they were typed at the keyboard. See Section C.5
(Appendix C, Section 5) for a description of how assign values to
function keys.
During Minitel emulation the program function keys SHIFT F1 thru
SHIFT F4 perform the following functions no matter what values you
assign to them.
SHIFT F1 - LOGON TO NETWORK
Automatically dial and log on to the network.
This is normally the first command that you will
issue after starting the emulator.
SHIFT F2 - CHANGE SERVICE
When connected to a service this command can be
used to return you to the service menu so that
you can select a new service.
SHIFT F3 - LOGOFF NETWORK then QUIT
This command disconnects you from the current
service, drops the line and then returns you to DOS.
SHIFT F4 - NETWORK LOGON
If you have an auto dial modem that does not
work with SHIFT F1 then you can manually instruct
your modem to dial and then issue this command to
logon to the network.
It is possible for the SHIFT F1, SHIFT F2 and SHIFT F4 commands to
fail for a number of reasons, including, a bad communication line, a
service not available or network failure. See Appendix H (Error
Messages) for a list of possible errors and instructions on how to
recover in case of an error.
The remaining program function keys (SHIFT F5 thru SHIFT F10) can be
used to add your own commands to the emulator. The command ALT f can
be used to display the current settings of the program function
keys. During TTY emulation all ten program function keys are
available to add new commands to the emulator.
4.5 Display Help Menu (F10)
This command displays a menu containing the Minitel function keys and
the most used emulator commands. To leave the menu you can either
press the ESC key or select one of the commands from the menu.
4.6 Program Function Key Menu (ALTf)
This command displays a menu containing all of the program function
key settings. To leave the menu you can either press one of the program
function keys (to run the key) or press ESC to leave the menu without
running a program function key.
If you have read sections one through four you now know all you need
to know to use MiniTerm. The appendices describe advanced information
and features that are not required during normal use of the
emulator.
APPENDIX A Command Line Parameters
-----------------------
During startup MiniTerm reads the contents of the file MT.CFG to
determine hardware specific information and obtain function key and
terminal settings (See Appendix C for a complete description of the
configuration file).
It is possible to have more than one configuration file. This is
useful if you routinely access more than one service and you need to
have different configuration parameters for each. To create a new
configuration file use the DOS copy command to create a copy of the
default configuration file (MT.CFG), then use a text editor such as
EDLIN to change the parameters to the values required by the new
system.
Example:
A>copy mt.cfg newconf.cfg <- make a copy of mt.cfg
A>edlin newconf.cfg <- change parameter values
A>mt newconf <- invoke MiniTerm using the
new configuration file
In this example we created a new configuration file called
'NEWCONF.CFG' and invoked MiniTerm with the new configuration. Note
that on the command line we typed 'mt newconf' rather than 'mt
newconf.cfg'. If you do not specify an extension on the configuration
file name then MiniTerm automatically appends a '.CFG'.
Some configuration parameters can be changed using command line
options. For example suppose that our configuration file 'MT.CFG'
specifies that COM1: is to be used for communications and we really
want to use COM2:. This can be done with the following command.
mt /c2
The above command will start the emulator using COM2: for
communications. When you exit from the emulator MiniTerm will
automatically change the communications port parameter in 'MT.CFG'
from one to two so that the next time you invoke MiniTerm you will
not have to specify the '/c2'. The backslash in the command tells
MiniTerm that you are specifying a command line option and not a
configuration file name. The 'c' specifies that we want to change the
communications port and the '2' says that we want to change the
communications port to COM2:. Command line parameters can also be
used in combination with a configuration file name. In the following
example the configuration file 'NEWCONF.CFG' is used instead of
'MT.CFG'.
mt newconf /c2
The general form of all command line options is:
backslash single_character_option option_parameter
No spaces are allowed between the single_character_option and the
option_parameter. Not all options have an option parameter. Either
upper or lower case can be specified for both the option name and
parameter. The following table lists all of the available command
line options and the valid parameter values for each.
Equivalent
Config file
Option Parameter Description
c COMMPORT Set communications port
Valid parameter values are 1 and 2
b SPEED Set line speed in bits per second
Valid parameter values are:
300,1200,2400,4800,9600,19200
p PARITY Set the character parity type
Valid param values are o,e,n,m,s
Where o=ODD,e=EVEN,n=NONE,m=MARK,s=SPACE
d DATABITS Set the number of data bits per character
Valid parameter values are 7 and 8
s STOPBITS Set the number of stop bits per character
Valid parameter values are 1 and 2
a DISPLAY_ADAPTOR Specify display adaptor type
Valid parameter values are H,C,E,M
Where H=Hercules,C=CGA,E=EGA,M=MDA
e EMULATION Specifies the type of terminal to be
emulated
Valid parameter values are T and M
Where T=TTY and M=Minitel
m <none> Specifies the name of a script (macro)
language program to run after startup.
? Causes this table to be printed at the
terminal. This option has no parameters.
More than one command line parameter can be specified when starting
MiniTerm. The syntax of the MiniTerm command line is:
mt config_file_name /cx /bx /px /dx /sx /ax /ex /mx /?
Notes:
The 'x' denotes the position of the option parameter. Command line
options can be specified in any order. The configuration file name(s)
can also appear after or between command line options. If more than
one configuration file is named on the command line than they are
read in the order specified and only the last one is updated to
reflect any changes. Having more than one configuration file allows
you to separate the different types of parameters into separate
configuration files. For example you may wish to put the
communications parameters in one file and the program function key
settings in another.
Examples:
In this example we start MiniTerm using the configuration file
'INFONET.CFG' and specify that the line speed is to be changed to
2400 bps (bits per second) and that the display adaptor is to be
changed to EGA.
mt infonet /b2400 /ae
The following example is the same as the first except that we specify
two configuration file names.
mt origconf newconf /b2400 /ae
Suppose that we want a line speed of 2400 bps but that we do not want
to update the original configuration file. In the following example
this is done by specifying the DOS device NUL as the last
configuration file name.
mt mt.cfg nul /b2400
^ ^ ^
| | |
| | Specifies modification to original
| | configuration.
| Specifies name of the configuration file where
| the updated configuration is to be stored.
Original configuration read from here.
APPENDIX B Files that are distributed with the emulator
--------------------------------------------
The following files are distributed with the emulator.
MT.EXE - The MiniTerm Minitel terminal emulator
CGA.FNT - Data file containing character font descriptions
for the CGA and EGA display adaptors (only necessary
when using a CGA or EGA display adaptor)
HERCULES.FNT - Data file containing character font descriptions
for the HERCULES display adaptor (only necessary
when using a HERCULES display adaptor)
MT.DOC - The file that you are now reading.
MTINST.EXE - Emulator installation program.
PHONE.DAT - Infonet access telephone listing (used by MTINST)
MTINST.FIL - Emulator file list (used by MTINST)
MTC.EXE - Script Language Compiler
LOGON.MT - Script language program to dial and logon to the
Infonet service network (needed by the emulator
SHIFT F1 command)
LOGON.MTO - Compiled version of the above program
CHANGESE.MT - Script language program which causes a disconnect
from the current service and returns you to the menu
so that you can select a new service (needed by the
emulator SHIFT F2 command)
CHANGESE.MTO - Compiled version of the above program
NETLOGON.MT - Script language program to that logs on to the Minitel
service network (needed by emulator SHIFT F1, SHIFT F2
and SHIFT F4 commands)
NETLOGON.MTO - Compiled version of the above program
APPENDIX C Configuration parameters
------------------------
This section describes the parameters in the MiniTerm configuration
file (MT.CFG). The configuration file contains one parameter per
line. Lines are separated by CR/LF pairs. All lines have the
following format.
parameter_name=parameter_value
The equal sign (ASCII 3D) separates the parameter name from its
value. Control characters can be specified in the parameter value by
using a circumflex (^) followed by another character. For example ^M
(control M) can be used to specify a carriage return. Two
circumflexes in a row can be used to specify a circumflex. See
Appendix F for a detailed discussion on entering control characters
in a string.
The following table describes all of the configuration parameters
that are implemented in this version of the emulator.
C.1) Modem Paramters
Parameter Name Type Description
MODEM int Describes the type of modem. Valid
values are:
0 = HAYES300
2 = HAYES1200
3 = HAYES1200B
4 = HAYES2400
5 = HAYES2400B
6 = MANUAL
7 = DIRECT
8 = OTHER
MODEM_INIT char String that must be sent to initialize
the modem (if any)
MODEM_RESPONSE char String that the modem sends in response
to an initialization command.
MODEM_DIAL_PREFIX char String that must prefix the telephone
number in a dial command
MODEM_DIAL_SUFFIX char String that must follow the telephone
number in a dial command
MODEM_SUCCESS char Specifies a successful response to a
modem dial request. There can be more
than one of these parameters present if
there are more than one success responses
(maximum of ten).
MODEM_FAILURE char Specifies a failure response to a modem
dial request. There can be more than one
of these parameters present if there
are more than one failure responses
(maximum of ten).
C.2) User Information
Parameter Name Type Description
PHONE char Telephone number of nearest INFONET node
USERID char Network User ID
PASSWORD char Network password
C.3) Communication Parameters
Parameter Name Type Description
COMMPORT int Number of the port to use for
communications (1=COM1, 2=COM2, etc)
SPEED int Communications speed in bits per second
(one of 300, 1200, 2400, 4800, 9600,
19200)
PARITY char Parity (one of O,E,N,M,S = ODD, EVEN,
NONE, MARK, SPACE respectively)
DATABITS int Data Bits (either 7 or 8)
STOPBITS int Stop Bits (either 1 or 2)
BREAK_LEN int Duration of BREAK signal in milliseconds
(a break signal can be sent with the
ALTb command)
CARRIER_DETECTABLE int This parameter informs the emulator
if the presence of carrier is
detectable by looking at the state of
the RS232 CD pin. In some cases the
carrier is not detectable because the
modem keeps this signal high or the
pin is missing from the cable that
connects the modem to the PC.
FLOWCONTROL int This parameter can have one of the
following values.
0 = NONE
1 = XON/XOFF (TTY emulation only)
2 = CTS/RTS hardware protocol
(XON/XOFF protocol should not be used
during Minitel emulation)
If the port is other than COM1 or COM2 then the following parameters
must also be specified (values must be specified in a decimal radix).
ADDR8250 int I/O address of 8250 UART
INTVECTOR int Interupt vector number
ADDR8259 int Absolute I/O address of 8259 Interupt
Controller
IRQ int IRQ number for 8259
C.4) Display Parameters
Parameter Name Type Description
DISPLAY_ADAPTOR int Type of display adaptor in the PC.
Valid values are:
0 = HGC (HERCULES)
1 = CGA
2 = EGA
3 = MDA (MONOCHROME)
C.5) Program Function Keys
Parameter Name Type Description
PF1 char Setting of program function key 1
PF2 char Setting of program function key 2
PF3 char Setting of program function key 3
PF4 char Setting of program function key 4
PF5 char Setting of program function key 5
PF6 char Setting of program function key 6
PF7 char Setting of program function key 7
PF8 char Setting of program function key 8
PF9 char Setting of program function key 9
PF10 char Setting of program function key 10
Each program function key value is either NULL or has the following
format.
Positions Meaning
1 Type of value stored in the key. Must be one of the
following.
M - A MACRO to be executed
S - A string to be sent
2 A single dash character (ASCII 2DH). This is just a
separator to make the line readable.
3- Function key value.
Key Type Field Meaning
M Name of file containing a macro to be run
when this key is pressed
S String to be sent to the remote system when
this key is pressed. Control characters can
be specified in this string by using a
circumflex (^) followed by another
character (See Appendix F).
e.g.
To assign a HAYES dial command to program function key five the
following line could be added to the configuration file.
PF5=S-ATDP438-8304^M
^ ^ ^ ^
| | | |
| | | The ^M specifies a carriage return
| | Program function key value
| Program function key type
Names the program function key to be set
Note that during Minitel terminal emulation the configuration file
parameters SHIFT F1 through SHIFT F4 are ignored.
C.6) Terminal Parameters
Parameter Name Type Description
EMULATION int Type of emulation to perform.
Value must be one of:
0 = TTY
1 = MINITEL
LOCAL_ECHO int Local echo on or off (0=OFF, 1=ON).
During MINITEL emulation this flag works
with the CARRIER_DETECTABLE flag. If
the carrier is detectable and local echo
is on then keystrokes will be echoed to
the screen when there is no carrier
(i.e. when 'L' appears on status row).
During TTY emulation keystrokes are
always echoed when this parameter is on.
PAGE_MODE int Page or scroll mode flag (0=SCROLL MODE,
1=PAGE MODE)
APPENDIX D Keyboard Mapping
----------------
The following describes the mapping of the Minitel keyboard to the PC
keyboard.
Single Codes
Code Sent Key or Combination
(in hex) Character of Keys
Minitel PC
00 NUL Ctrl' Ctrl @
01 SOH Ctrl A
02 STX Ctrl B
03 ETX Ctrl C
04 EOT Ctrl D
05 ENQ Ctrl E
06 ACK Ctrl F
07 BEL Ctrl G
08 BS Ctrl H grey minus or Ctrl H
09 HT Ctrl I
0A LF Ctrl J or Ctrl: Ctrl J
0B VT Ctrl K or Ctrl; Ctrl K
0C FF Ctrl L
0D CR Ctrl M or Enter grey plus or Ctrl M
0E SO Ctrl N
0F SI Ctrl O
10 DLE Ctrl P
11 Cursor ON Ctrl Q
12 REP Ctrl R
13 SEP Ctrl S
14 Cursor OFF Ctrl T
15 NACK Ctrl U
16 SYN Ctrl V
17 ETB Ctrl W
18 CAN Ctrl X
19 SS2 Ctrl Y
1A SUB Ctrl Z
1B ESC Esc
1C FS Ctrl , Ctrl | or Ctrl \
1D SS3 Ctrl - Ctrl } or Ctrl ]
1E RS Ctrl . Ctrl ^
1F US Ctrl ? Ctrl -
20 Space Spacebar Spacebar
21 ! SK 1 **
22 " SK 2 **
23 # # or SK 3 **
24 $ SK 4 **
25 % SK 5 **
26 & SK 6 **
27 ' 'or SK 7 **
28 ( SK 8 **
29 ) SK 9 **
2A * * or SK : **
2B + SK ; **
2C , , **
2D - - **
2E . . **
2F Box with diagonal line SK ? /
30 0 0
31 1 1
32 2 2
33 3 3
34 4 4
35 5 5
36 6 6
37 7 7
38 8 8
39 9 9
3A : :
3B ; ;
3C < SK , **
3D = SK - **
3E > SK . **
3F ? ? **
40 @ SK ' **
41 A A Shift A
42 B B Shift B
43 C C Shift C
44 D D Shift D
45 E E Shift E
46 F F Shift F
47 G G Shift G
48 H H Shift H
49 I I Shift I
4A J J Shift J
4B K K Shift K
4C L L Shift L
4D M M Shift M
4E N N Shift N
4F O O Shift O
50 P P Shift P
51 Q Q Shift Q
52 R R Shift R
53 S S Shift S
54 T T Shift T
55 U U Shift U
56 V V Shift V
57 W W Shift W
58 X X Shift X
59 Y Y Shift Y
5A Z Z Shift Z
5B [ SK * **
5C 10 o'clock diagonal line SK Cancel \
5D ] SK # **
5E Up Arrow SK 0 ^
5F Low horizontal line Ctrl 6 _
60 Middle horizontal line Ctrl 5 `
61 a SK A A
62 b SK B B
63 c SK C C
64 d SK D D
65 e SK E E
66 f SK F F
67 g SK G G
68 h SK H H
69 i SK I I
6A j SK J J
6B k SK K K
6C l SK L L
6D m SK M M
6E n SK N N
6F o SK O O
70 p SK P P
71 q SK Q Q
72 r SK R R
73 s SK S S
74 t SK T T
75 u SK U U
76 v SK V V
77 w SK W W
78 x SK X X
79 y SK Y Y
7A z SK Z Z
7B Left vertical line Ctrl 1 or {
SK repeat
7C Middle vertical line Ctrl 2 |
7D Right vertical line Ctrl 3 or }
SK send
7E Upper horizontal line Ctrl 4 ~
7F Filled in Box Ctrl <-- Ctrl BS
Sequences of two or three codes
Code sent Key or combination
(in hex) Character of keys
Minitel PC
19,41 ` (grave accent) SK Next (not impl)
19,43 ^ (circumflex) SK Index (not impl)
Sequences sent by function keys
Key or Combination
of keys PC Key Codes Sent
Send F8 or Enter 13,41
Previous F3 or Shift Tab or PgUp 13,42
Repeat F4 13,43
Guide F5 13,44
Cancel F2 or End 13,45
Index F1 or Home 13,46
Correction F6 or Backspace 13,47
Next F7 or Tab or PgDn 13,48
Line/Local F9 13,49-Modem
SK Line/Local (not supported on PC) 13,49-Socket
Ctrl Line/Local Alt b Break to modem
Notes:
1) SK = Special key on Minitel
= Shift key on PC
2) Where there is no PC key specified the PC key is the same as the
Minitel key.
3) '**' Means to use the Key marked for this purpose on your
particular keyboard.
4) 'Grey minus' means the minus sign key on the numeric keypad. This
key causes a CR to be sent to the remote system.
5) 'Grey plus' means the plus sign key on the numeric keypad. This
keys causes a backspace character to be sent to the remote system.
APPENDIX E MiniTerm Script Language
------------------------
E.1 Script Language Compiler (MTC.EXE)
The MiniTerm script language is a semi-compiled language. To create a
script language program any text editor which creates an ASCII format
file can be used. Once a script program has been created it must be
compiled by the program 'MTC.EXE' (MiniTerm Compiler) before it can
be executed. MTC checks the source for syntax errors and produces a
compiled program as its result. Script source files are expected to
have an extension of 'MT'. MTC gives compiled macros an extension of
'MTO' (MiniTerm Object).
To compile a program with MTC just type the command
MTC source_file_name
in response to the DOS prompt. It is not necessary to specify the
'.MT' extension of the source file name. If you do not specify the
source file name on the command line then MTC will prompt you with
the line
'Source file name ?'.
If you enter a carriage return only in response to the source file
prompt then MTC will prompt you to enter the program source at the
terminal.
The following diagram illustrates the macro creation process.
Create Macro Source
file with text editor
(create mymacro.mt)
|
|
V
MTC mymacro
|
|
V
mymacro.mto
E.2 Running a Script Language Program
Scripts can be started by assigning them to a program function key
then pressing the program function key at run time or by using the /m
command line parameter. For example typing 'mt /mlogon' starts
MiniTerm then invokes the script program named 'logon'. Only one
script language program can be specified on the command line. If more
than one are specified than only the one that was last named is run.
While a script language program is running a reverse video 'M' will
appear on column 40 of the status row. A running script language
program can be aborted at any time by pressing the ESC key.
E.3 Script Language Description
A MiniTerm script language program consists of a series of
statements. Each statement can be preceeded by a label. A label
consists of up to 15 alphanumeric characters (and underscore)
followed by a colon. The first character of a label must be
alphabetic. Comments can be placed anywhere in a program by enclosing
the comment within curly brackets ({}). The END directive must follow
the last statement of a script language program (the END directive is
a message to the script language compiler (MTCOMP) telling it that
it has reached the end of the program).
The following is a description of all script language statements.
E.3.1) DIAL statement
The dial statement causes the modem to dial Infonet using the Phone
number and modem information from the MiniTerm configuration file. If
the dial attempt fails then the script language program is aborted
and a failure message is printed on the screen. The DIAL command
supports all required modems for the HOST machine. For example on the
PC the DIAL command supports the HAYES modem, MANUAL dial modems,
DIRECT modems and any command driven auto dial modem.
The following algorithm details the logic used by the DIAL command:
a) If the modem type is direct then terminate successfully otherwise
proceed with step b).
b) If the modem type is manual dial then proceed with step c)
otherwise go to step e)
c) Prompt user to dial the number
d) Prompt user for a key;
If the user enters an ESC then terminate with failure
If the user enters a key other than ESC terminate successfully
If the carrier signal goes from low to high while waiting for
a key then terminate successfully.
e) If there is a MODEM_INIT parameter in the configuration file then
send it and proceed to step f) otherwise proceed to step h).
f) If there is a MODEM_RESPONSE parameter in the configuration file
then proceed to step g) otherwise wait till two seconds elapses
with no data received from the remote system then proceed
to step h).
g) If the modem response is not received within 10 seconds then
terminate with failure otherwise proceed to step h).
h) Build a dial command from the MODEM_DIAL_PREFIX, PHONE and the
MODEM_DIAL_SUFFIX configuration parameters then send the dial
command to the modem.
i) If there are no MODEM_SUCCESS configuration parameters then
inform the user that a dial command has been sent and proceed
to step d).
j) Wait for any of the MODEM_SUCCESS or MODEM_FAILURE responses to
be received.
If 90 seconds go by with none of the success or failure responses
received then terminate with failure.
If a success response is received then terminate successfully.
If a failure response is received then proceed to step k).
k) Prompt the user to see if he wants to try another dial attempt.
If 'YES' then proceed to step e) otherwise terminate with failure.
E.3.2) BRANCH statement
SYNTAX:
BRANCH label
The BRANCH statement causes program execution continue with the
statement following the given label rather than the next statement.
statement 1
statement 2
BRANCH skip
statement 3
statement 4
skip: statement 5
In the above example the statements will be executed in the this
order:
statement 1
statement 2
statement 5
E.3.3) PAUSE statement
SYNTAX:
PAUSE tenths_of_second
The PAUSE statement causes the program to halt for the given number
of tenths of a second before proceeding with the next statement.
e.g.
PAUSE 10 <- pause for 1 second
E.3.4) TYPE statement
SYNTAX:
TYPE string
The TYPE statement causes the characters in the given string to be
sent to the remote system as though they were typed at the terminal.
The string can consist of any combination of the following.
- a quoted string. The quoted string can contain diagraphs
of the form '^letter' to include control characters in the
string. For example the digraph ^M is a carriage return.
See Appendix F for a complete description of digraphs. See
notes at the end of section E.5 for more details on quoted
strings.
- a Minitel function key (one of LOCAL_LINE, INDEX,
CANCEL, PREVIOUS, REPEAT, GUIDE, CORRECTION, NEXT,
SEND)
- a character constant (CR, LF, BS, BELL)
- any of the following configuration parameter names
PASSWORD
PHONE
USERID
e.g.
TYPE 'AT?' CR <- send string AT? followed by a CR
TYPE 'AT^M' <- same as above
TYPE 'CHAT' SEND <- send the string CHAT followed by
the Minitel send key
TYPE USERID CR <- send the value of the configuration
file USERID parameter followed by
a CR (carriage return)
E.3.5) QUIT statement
Terminates execution of the current script program.
E.3.6) DOPF statement
SYNTAX:
DOPF number
Causes the named program function key to be executed. This causes the
same effect as the user pressing the given function key at the
keyboard. Script language programs can invoke other script language
programs using function keys.
e.g.
DOPF 2 <- execute PF2
E.3.7) MESSAGE statement
SYNTAX:
MESSAGE string
This command causes the given string to appear in a pop up window on
the screen along with the message 'PRESS ANY KEY TO CONTINUE'. After
the user presses a key the pop up window disappears and the underlying
screen is restored. The string containing the message to be printed
must have the same format as a string in a TYPE statement.
e.g.
MESSAGE 'Logon Procedure has failed'
E.3.8) LOOP statement
SYNTAX:
LOOP number
statements
AT_END_DO
statements
ENDLOOP
The LOOP statement causes the statements between the LOOP keyword and
the AT_END_DO clause to be executed 'number' times. After the last
time the statements following the optional AT_END_DO clause are
executed. The loop can be terminated prematurely by using the BREAK
statement or the BRANCH statement. The BREAK statement causes program
execution to continue following the ENDLOOP clause. If the loop is
terminated prematurely for any reason then the statements following
the AT_END_DO clause are not executed. The BREAK statement is ignored
if it is encountered anywhere other than within a LOOP.
e.g.
LOOP 3
type 'hello' CR
AT_END_DO
type 'this is the last hello'
ENDLOOP
The above example causes the following data to be sent to the remote
system.
hello
hello
hello
this is the last hello
e.g. 2
LOOP 2
TYPE 'I am about to pause for 5 seconds'
PAUSE 50
ENDLOOP
The above example demonstrates a loop statement without an AT_END_DO
clause.
E.3.9) WAIT statement
SYNTAX:
WAIT tenths
CASE string 1
statements
CASE string 2
statements
.
.
CASE string N
statements
FAILURE
statements
ENDWAIT
The WAIT statement causes the script program to WAIT for data from
the remote computer system. If any of the strings named by one of
the CASE clauses are received from the remote system then the
statements following that CASE clause are executed. If 'tenths'
tenths of a second go by with no data received from the remote system
or if the line drops then the statements following the optional
FAILURE clause are executed. After the statements following a CASE or
FAILURE clause are executed execution continues after the ENDWAIT
clause.
The string parameter of the CASE clause must have the same format as
a string in a TYPE statement. Multiple strings can be specified by
separating them with a comma (,). If there are multiple strings
separated by a comma then the statements following the CASE clause
are executed if any one of the named strings are received from the
remote system.
e.g.
TYPE 'ATDP 438-8304' CR
WAIT 600 { wait up to 60 seconds (600 tenths) }
CASE 'CONNECT', 'CONNECT 1200', 'CONNECT 600', 'CONNECT 2400'
{ the dial attempt has succeed so just continue }
{ with the statement following the ENDWAIT }
CASE 'NO CARRIER', 'BUSY', 'NO ANSWER'
MESSAGE 'Dial attempt has failed, try again later'
QUIT
CASE 'ERROR', 'NO DIALTONE'
MESSAGE 'Fatal error during dial attempt'
QUIT
FAILURE
MESSAGE 'Timeout, line lost or user ESC during Dial Attempt'
QUIT
ENDWAIT
WAIT 5
CASE CR LF { wait for rest of modem response }
ENDWAIT
In the above example we send a dial request to a HAYES modem and use
the WAIT statement to check the result (note that you would normally
not have to do this since the above and more can be performed
automatically by the DIAL command).
e.g. 2
LOOP 10
TYPE CR
WAIT 3 CASE '#' BREAK ENDWAIT
AT_END_DO
MESSAGE 'PAD not responding with a # prompt.'
QUIT
ENDLOOP
In the above example we send up to 10 carriage returns (one every
three tenths of a second) in an attempt to get a '#' prompt from an
Infonet PAD. The WAIT statement waits up to three tenths of a second
for a '#', if it fails there is no effect (since there is no FAILURE
clause). If the WAIT statement succeeds then the BREAK statement is
executed and the LOOP terminates prematurely. If the loop terminates
prematurely then the statements following the AT_END_DO clause are
not executed. Note that statements can be split over multiple lines.
The above WAIT statement would be more clearly written as;
WAIT 3
CASE '#'
BREAK
ENDWAIT
E.4 Script Program Example
The following example is a complete script language program that
dials Infonet and requests a network service.
{ logon.mt - macro program to dial INFONET and request
network service }
dial { dial INFONET - uses config modem type & number }
{ try up to six times to get a pound sign }
loop 6
type CR
wait 3 case '#' break endwait
at_end_do
message 'PAD not responding with #'
quit
endloop
{ perform network logon }
type 'x' CR
wait 50
case '*' { success }
failure
message 'PAD not responding with *'
quit
endwait
type '.vmt' CR { request network service }
end
E.5 Detailed Script Language Syntax Definition
The following defines the syntax of all legal script language
programs.
Program -> Lines END
Lines -> Lines Line
-> Line
-> <empty>
Line -> Label Statement
Label -> <identifier> :
-> <empty>
Statement -> WAIT <integer> Waitcases Failcase ENDWAIT
-> LOOP <integer> Lines Endstmnts ENDLOOP
-> MESSAGE Charexp
-> DOPF <integer>
-> DIAL
-> BRANCH <identifier>
-> PAUSE <integer>
-> QUIT
-> TYPE Charexp
-> BREAK
Waitcases -> Waitcases Waitcase
-> Waitcase
Waitcase -> CASE Charexplist Lines
Charexplist -> Charexplist , Charexp
-> Charexp
Failcase -> FAILURE Lines
-> <empty>
Endstmnts -> AT_END_DO Lines
-> <empty>
Charexp -> Charexp Charterm
-> Charterm
Charterm -> Envcharvar
-> Charconst
-> Functionkey
-> <string>
Charconst -> CR
-> LF
-> BS
-> BELL
Envcharvar -> PF1
-> PF2
-> PF3
-> PF4
-> PF5
-> PF6
-> PF7
-> PF8
-> PF9
-> PF10
-> PASSWORD
-> PHONE
-> USERID
Functionkey -> LOCAL_LINE
-> INDEX
-> CANCEL
-> PREVIOUS
-> REPEAT
-> GUIDE
-> CORRECTION
-> NEXT
-> SEND
Notes:
i) <empty> means that the construct is optional.
ii) <identifier> is an identifier of up to 15 alphanumeric characters
(and underscore) in length. The first character of an identifier must
be alphabetic.
iii) <string> is a character string enclosed in single quotes. Single
quotes can be included within the string by putting two of them
together. For example to specify the string;
that's all folks
you would enter
'that''s all folks'.
iv) <integer> is an integer value in the range -32768 to 32767.
Values outside this range will cause undefined results.
v) Comments can appear anywhere in the program except within a token.
Examples:
WAIT { this is a legal comment } 10
CASE 'hello'
ENDWAIT
WAI{ this comment causes an error }T 10
CASE 'hello'
ENDWAIT
APPENDIX F Entering Control Characters
---------------------------
Control characters can be entered into configuration file parameters,
literal strings in a script language program and in the answers to
prompts in the installation program by using a two character digraph
of the form ^x where '^' is the circumflex character (ascii 94) and
'x' is any other character. The sequence ^x causes the control
character whose value is the ascii value of the upper case version of
the character minus 64 to be entered into the string. For example ^m
causes a carriage return to be entered into the string (the ascii
value of an upper case 'm' is 77. Seventy-seven minus 64 is equal to
13 which is the ascii value of a carriage return).
The following table lists a number of useful digraphs:
Digraph Control Character Ascii Value
^M CR 13
^J LF 10
^H BS 8
^G BELL 7
^L FF 12
^I TAB 9
^[ ESC 27
The following digraph/character combinations can be used to encode
Minitel functions keys within a string.
Code Function Key Ascii Values
^SA SEND 19 65
^SB PREVIOUS 19 66
^SC REPEAT 19 67
^SD GUIDE 19 68
^SE CANCEL 19 69
^SF INDEX 19 70
^SG CORRECTION 19 71
^SH NEXT 19 72
^SI LOCAL/LINE 19 73
If you wish to enter a circumflex (^) in a string as itself then you
must put two of them in a row. If you enter a sequence in a string of
the form ^x in a string and the ascii value of the character x is
less than 64 then the circumflex (^) is ignored.
APPENDIX G Use of the Minitel Function Keys
--------------------------------
The following tables describe the most common meaning of each of the
Minitel function keys. Pressing the asterisk key (*) prior to a
function key modifies the meaning of a number of the keys.
FUNCTION KEY MEANING
LOCAL LINE Causes a disconnection from the current service.
SEND Validation of character strings or completion
of a form.
REPEAT Causes service to retransmit the previous screen.
Used to clear transmission errors.
* REPEAT Refresh the current display with updates made since
the previous request.
INDEX Return to the index of the service in use.
* INDEX Access to the index at the highest level in the
case of a hierarchical index.
GUIDE Request HELP from the service.
CORRECTION Used to erase the last character typed.
The following function keys have slightly different meanings
depending on whether you are in a data entry screen or whether you
are giving a command to an application.
MEANING IN DATA MEANING AS COMMAND
FUNCTION KEY ENTRY SCREEN TO APPLICATION
CANCEL Deletes the contents of Abort current enquiry.
the current field.
* CANCEL Delete all fields on the No Meaning
current form and move to
the first field.
NEXT Move to following field. Move to following page.
PREVIOUS Move to previous field. Move to previous page.
* NEXT Move to following page. Move to following
document.
* PREVIOUS If there is a previous Return to the las menu
page then return to the page or message.
first field of the previous
page otherwise move to the
first field of the current
page.
The above tables were adapted from tables in the Intelmatique
document titled 'USE OF THE MINITEL FUNCTION KEYS'.
APPENDIX H Error Messages
--------------
This appendix lists the most common error messages that can occur
and recommends corrective that can be taken for each.
If the suggested corrective action fails for the following group of
commands then try exiting the emulator (with the SHIFT F3 command),
restarting the emulator (with the MT command) and then using the SHIFT
F1 command to restart.
Command(s) Error and Corrective Action
SHIFT F1 "Timeout or Line Lost during Dial Attempt"
Retry the SHIFT F1 command.
SHIFT F1 "Dial Failure: Modem not responding to init string"
Make sure that your modem is connected and powered on
then retry the SHIFT F1 command.
SHIFT F1 "DIAL Attempt has Failed."
"Try Again ? (Y=Yes, N=No)"
Enter 'Y' if you want MiniTerm to try again. If you
want to quit enter 'N' then issue the SHIFT F3
command. If you want to try dialing manually enter
'N' then enter the dial command. If you get a
connection by dialing manually you can use the SHIFT
F4 command to logon to the network.
SHIFT F1,
SHIFT F2,
SHIFT F4 "PAD not responding with #"
"PAD not responding with *"
"Unable to connect to network service"
If any of the above errors occur then issue the
SHIFT F4 command (even if the error occured in a
SHIFT F1 or SHIFT F2 command).
SHIFT F1,
SHIFT F2,
SHIFT F4 "User ID prompt not received"
If this error occurs then exit the emulator with the
SHIFT F3 command and start again.
If any of the following errors occur then you must exit the emulator
to take corrective action.
Command(s) Error and Corrective Action
SHIFT F1 "Dial Failure: No PHONE parameter in config file"
To use the auto dial feature of MiniTerm you must
enter a value in response to the access number
prompt in MTINST. If this error occurs then re-run
MTINST and enter an access number.
ALT x, ALT q,
SHIFT F3 "Error saving configuration to <xxx>"
Whenever the configuration is changed due to a command
line parameter or automatically due to an invalid
hardware specification MiniTerm attempts to update
the configuration file before exiting. The above
error is displayed when MiniTerm is unable to update
the configuration file. Possible reasons include a
full disk or bad disk sectors. To correct the problem
try deleting unnecessary files from the disk or move
MiniTerm onto a different disk.
SHIFT Fx "Macro <xxx> not found."
Make sure that the file 'xxx' is in the default drive
and directory before starting the emulator.
SHIFT Fx "Unexpected EOF or disk error while reading <xxx>"
"Aborting Macro - Bad Instruction encountered"
"Aborting Macro - Bad env var found"
"Aborting Macro - Bad function key found"
"Aborting Macro - Bad character item found"
If any of the above errors occur then the script
program that was running when the error occurred
has become corrupted. Try recompiling the script
program with MTC.
SHIFT Fx "Illegal value in key PFx -- Cannot Execute"
This error occurs if there is a bad definition for
the program function key PFx in the configuration
file. Possible errors are;
- A character other than an upper case 'M' or 'S'
was specified as the first character of the key
definition
- A character other than '-' was specified as the
second character of the key definition
To correct this problem fix the program function key
definition in the configuration file.
APPENDIX I Printing the screen
-------------------
From within the emulator it is possible to send the contents of your
screen to the printer. The steps the your must perform to do this
depends on which type of display adaptor that you have in your PC.
-> IBM Monochrome Display Adaptor (MDA)
To print the contents of the screen hold down the SHIFT key and press
the PrtSc key.
-> EGA and CGA display adaptors
In order to be able to print the screen when using a CGA or EGA
display adaptor you must run the DOS GRAPHICS command before running
the emulator (See the GRAPHICS command in your DOS operating system
reference manual).
To print the contents of the screen hold down the SHIFT key and press
the PrtSc key.
-> Hercules display adaptor
In order to be able to print the screen when using a Hercules graphic
card you must issue the following command before running the
emulator.
HGC PRINT
The program HGC.COM can be found on the diskette that came with your
Hercules graphics card.
To print the contents of the screen hold down the SHIFT key and press
the PrtSc key, then release the SHIFT key and press the zero (0) key.